package com.leyou.order.service.service;

import com.leyou.common.bean.PageResult;
import com.leyou.common.bean.Result;
import com.leyou.order.inter.dto.OrderPageDTO;
import com.leyou.order.inter.dto.WebOrderPageDTO;
import com.leyou.order.inter.pojo.Order;
import com.leyou.order.inter.pojo.OrderDetail;

import java.util.List;

/**
 * @author zqq
 * @ClassName OrderService
 * @Description
 * @date 2020/3/5-16:55
 */
public interface OrderService {

    /**
     * @Title: createOrder
     * @Description: 添加订单
     * @author: zqq
     * @param order 参数类
     * @return: com.leyou.common.bean.Result<java.lang.Long>
     * @createTime: 2020-03-10 17:41
     * @version: v.1.0
     */
    Result<String> createOrder(Order order);

    /**
     * @Title: queryById
     * @Description: 根据id查询订单信息
     * @author: zqq
     * @param id
     * @return: com.leyou.common.bean.Result<com.leyou.order.inter.pojo.Order>
     * @createTime: 2020-03-10 17:42
     * @version: v.1.0
     */
    Result<Order> queryById(Long id);

    /**
     * @Title: queryUserOrderList
     * @Description: 分页查询订单
     * @author: zqq
     * @param dto 参数类
     * @return: com.leyou.common.bean.Result<com.leyou.common.bean.PageResult<com.leyou.order.inter.pojo.Order>>
     * @createTime: 2020-03-10 17:42
     * @version: v.1.0
     */
    Result<PageResult<Order>> queryUserOrderList(OrderPageDTO dto);

    /**
     * @Title: updateStatus
     * @Description: 修改订单
     * @author: zqq
     * @param id 订单id
     * @param status 订单状态
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-03-10 17:43
     * @version: v.1.0
     */
    Result updateStatus(Long id, Integer status);

    /**
     * @Title: queryDetailByOrderId
     * @Description: 查询订单详情
     * @author: zqq
     * @param orderId
     * @return: com.leyou.common.bean.Result<java.util.List<com.leyou.order.inter.pojo.OrderDetail>>
     * @createTime: 2020-04-08 14:24
     * @version: v.1.0
     */
    Result<List<OrderDetail>> queryDetailByOrderId(Long orderId);

    /**
     * @Title: queryOrderByDto
     * @Description: 查询订单
     * @author: zqq
     * @param dto
     * @return: com.leyou.common.bean.Result<com.leyou.common.bean.PageResult<com.leyou.order.inter.pojo.Order>>
     * @createTime: 2020-04-08 17:28
     * @version: v.1.0
     */
    Result<PageResult<Order>> queryOrderByDto(WebOrderPageDTO dto);

    /**
     * @Title: deleteOrder
     * @Description: 删除订单
     * @author: zqq
     * @param ids
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-04-08 18:56
     * @version: v.1.0
     */
    Result deleteOrder(String ids);
}
